﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DBUtil.SqlSegment
{
    public abstract class ConvertSqlSegment
    {
        private readonly DBAccess db;

        public ConvertSqlSegment(DBAccess db)
        {
            this.db = db;
        }
        /// <summary>
        /// 整形转字符串(包括 byte/sbyte/short/ushort/int/unit/long/ulong)
        /// </summary>
        /// <returns></returns>
        public abstract string ConvertIntegerToString(string input);

        /// <summary>
        /// 小数转字符串(包括 float double decimal)
        /// </summary>
        /// <returns></returns>
        public abstract string ConvertDecimalToString(string input);

        /// <summary>
        /// 日期时间转字符串(包括 datetime/datetimeoffset/dateonly/timeonly)
        /// </summary>
        /// <returns></returns>
        public abstract string ConvertDateTimeToString(string input);

        /// <summary>
        /// 字符串转整形
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public abstract string ConvertStringToInteger(string input);

        /// <summary>
        /// 字符串转小数
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public abstract string ConvertStringToDecimal(string input);

        /// <summary>
        /// 字符串转日期时间
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public abstract string ConvertStringToDateTime(string input);
    }
}
